<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>意见列表 - 学生意见管理系统</title>
    <div th:replace="~{include/all_include::title}"/>
</head>
<body>
<div th:replace="~{include/all_include::header}"/>
<!-- 网页的主体部分 -->
<div class="container">
    <div class="row">
        <div class="col-md-11 col-sm-offset-1">
            <h2 class="sub-header">意见列表</h2>
            <form th:action="@{/head/opinionDesc/list}" method="post" class="form-inline">
                <label for="keyword">关键字:</label>
                <input type="text" name="keyword" th:value="${keyword}" class="form-control mr-sm-2">
                <input type="submit" class="btn btn-primary" value="搜索">
            </form>
            <a th:href="@{/head/opinionDesc/add}">新增</a>
        </div>
        <div class="col-md-11 col-sm-offset-1">
            <div class="table-responsive mt-2">
                <input type="hidden" name="parentId" value="${parentId}">
                <table class="table table-striped table-hover">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>意见类型</th>
                        <th width="150">标题</th>
                        <th>分类</th>
                        <th>解决状态</th>
                        <th>解决时间</th>
                        <th>响应时间</th>
                        <th>状态</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="info:${response.data.list}">
                        <td th:text="${infoStat.index+1}"></td>
                        <td th:text="${info.type.name}"></td>
                        <td th:text="${info.name}"></td>
                        <td th:text="${info.opTypeStr}"></td>
                        <td th:text="${info.resolveStatusStr}"></td>
                        <td th:text="${info.resolveTime}"></td>
                        <td th:text="${info.reponseTime}"></td>
                        <td th:text="${info.statusStr}"></td>
                        <td th:text="${info.createTime}"></td>
                        <td>
                            <a th:if="${info.parentId == 0}" target="_blank" th:href="@{/head/opinionDesc/list(parentId=${info.id}, parentId=${info.parentId})}">回复列表</a>
                            <a th:if="${info.parentId == 0}" th:href="@{/head/opinionDesc/edit(id=${info.id})}">编辑</a>
                            <br/>
                            <a th:href="@{/head/opinionDesc/descInfo(id=${info.id})}">详情</a>
                            <a th:if="${info.parentId == 0}" th:href="@{/head/opinionDesc/descDel(id=${info.id}, parentId=${info.parentId})}">删除</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="col-md-11 col-sm-offset-1">
            <form id="pageForm" th:action="@{/head/opinionDesc/list}"
                  method="post" class="form-inline col-md-11 col-sm-offset-1">
                <!-- 设置一些参数 -->
                <input type="hidden" name="keyword" th:value="${keyword}">
                <input type="hidden" name="status" value="">
                <input type="hidden" name="st" value="">
                <input type="hidden" name="ed" value="">
                <nav aria-label="Page navigation example">
                    <ul class="pagination justify-content-end">
                        <li class="page-item">
                            <a href="#" class="page-link"
                               th:onclick="return pageFormSubmit('pageForm','currentPage','1','pageSize',[[${response?.data?.pageInfoUtil?.pageSize}]])"
                            >
                                <span>首页</span>
                            </a>
                        </li>
                        <li class="page-item">
                            <a href="#" class="page-link"
                               th:onclick="return pageFormSubmit('pageForm', 'currentPage', '[[${response?.data?.pageInfoUtil?.prePage}]]', 'pageSize',[[${response?.data?.pageInfoUtil?.pageSize}]])"
                            >
                                <span>上一页</span>
                            </a>
                        </li>
                        <li class="page-item">
                            <a href="#" class="page-link"
                               th:onclick="return pageFormSubmit('pageForm', 'currentPage', '[[${response?.data?.pageInfoUtil?.nextPage}]]', 'pageSize',[[${response?.data?.pageInfoUtil?.pageSize}]])"
                            >
                                <span>下一页</span>
                            </a>
                        </li>
                        <li class="page-item">
                            <a href="#" class="page-link"
                               th:onclick="return pageFormSubmit('pageForm', 'currentPage', '[[${response?.data?.pageInfoUtil?.totalPage}]]', 'pageSize',[[${response?.data?.pageInfoUtil?.pageSize}]])"
                            >
                                <span>尾页</span>
                            </a>
                        </li>
                        <li class="page-item">共<span th:text="${response?.data?.pageInfoUtil?.totalRecord}"></span>条,共<span th:text="${response?.data?.pageInfoUtil?.totalPage}"></span>页</li>
                        <li class="page-item">
                            第<input type="text" class="paginate_button" id="currentPage" name="currentPage" th:value="${response?.data?.pageInfoUtil?.currentPage}" size="5" maxlength="5">页
                        </li>
                        <li class="page-item">
                            每页<input type="text" class="paginate_button" id="pageSize" name="pageSize" th:value="${response?.data?.pageInfoUtil?.pageSize}" size="5" maxlength="5">条
                        </li>
                        <li class="page-item"><input type="submit" value="GO" class="form-control btn btn-primary"/></li>
                    </ul>
                </nav>
            </form>
        </div>
    </div>
</div>

<div th:replace="~{include/all_include::footer}"/>
</body>
</html>